com.highdeal.hci
Class ServerFailureException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.highdeal.hci.OperationFailureException
              extended by com.highdeal.hci.ServerFailureException
All Implemented Interfaces:
OperationResult, XMLMarshallable, java.io.Serializable

public class ServerFailureException
extends OperationFailureException

Exception thrown when a nonbusiness exception occurs in the connected SAP CC Core Server system; The initial operation request has failed but no change is stored in the back-end database system.

Important Note

This exception is specified in HCI but it is available in both technical interfaces:

Implementation in Your Client Application

Exception and Error Handling

Depending on your business requirements, design and develop the handling functions in your client application.

Consult the Field Detail section for more information about the failure to handle in your client application.

When your client application receives this exception, it means that the initial operation request did not succeed and any change has been performed into the back-end database system: the database transaction has been rolled back.

Use the getMessage() method that returns the message of the nested exception if it exists.

This exception is used to transform in a single common exception a large set of internal exceptions (Runtimes exception for most of them) that occurs in on server side in the connected SAP CC Core Server system. That the reason why this exception manages a nested Throwable attribute which is initialized with the original exception. The SAP CC system never transmits this nested exception to your client application.

Note

Each time a Server Failure exception is raised and created from an internal exception, the SAP CC Core Server system records the nested (internal) exception stack trace in the logs or traces. The SAP CC system records also the Server Failure exception sent to your client application. This facilitates the troubleshooting of problems and potential anomaly.

Reason Categories

Reason Category Reason Code Range Failures Customizing and Implementation Troubleshooting (Next Steps)
Unsupported Java failure in the SAP CC system -1 -1: Unsupported Java failure

Note

To design the exception and error handling functions (automated treatments, logging and manual treatments), see the Field Detail section in this topic.

Refer to the information available in the Customizing subsection of each failure to develop your integration code.

Note

For troubleshooting investigations, see the Field Detail section in this topic.

Refer to the information available in the Next Steps subsection of each failure.

All reasons relative to general SAP CC system failure (server failure) 0 to 99
All reasons relative to the back-end database system 100 to 199
All reasons relative to the Message TCP technical interface 200 to 299
All reasons relative to the HTTP Communication Interface (HCI) 300 to 399
All reasons relative to the data cache management 400 to 499
All the server-side networking/communication issues 500 to 599
Access Control Functions and Customer Master Data Identification 600 to 699
Guiding Functions 700 to 799
Bulk Loading Functions 800 to 899
Audit Functions 900 to 999

Consider the detailed information in the Field Detail section.

See Also:
Serialized Form

XML API for HCI

The XML APIs specify the following XSD fragment:

XSD Fragment

<xs:element name="serverFault">
   <xs:complexType>
     <xs:attribute name="message" type="xs:string"/>
     <xs:attribute name="reason" type="ServerFaultReasonType"/>
   </xs:complexType>
 </xs:element>

 <xs:simpleType name="ServerFaultReasonType">
   <xs:restriction base="xs:string">
     <xs:enumeration value="databaseFailure"/>
     <xs:enumeration value="databaseFailover"/>
     <xs:enumeration value="serverTimeoutOccured"/>
     <xs:enumeration value="cannotLockResource"/>
     <xs:enumeration value="IOFailure"/>
     <xs:enumeration value="interInstanceCommunicationFailure"/>
     <xs:enumeration value="serverShuttingDown"/>
     <xs:enumeration value="statefulServiceViolationProtocol"/>
     <xs:enumeration value="statelessServiceViolationProtocol"/>
     <xs:enumeration value="hciServiceViolationProtocol"/>
     <xs:enumeration value="cacheInvalidationFailure"/>
     <xs:enumeration value="messageQueueFull"/>
     <xs:enumeration value="messageUnsupportedService"/>
     <xs:enumeration value="hciUnsupportedService"/>
     <xs:enumeration value="hciConcurrency"/>
     <xs:enumeration value="incompatibleConfiguration"/>
     <xs:enumeration value="serverToClientCommunicationFailure"/>
     <xs:enumeration value="accessCompatibilityFailure"/>
     <xs:enumeration value="unsupportedFailure"/>
     <xs:enumeration value="offerCacheBusyWhileRefreshing"/>
     <xs:enumeration value="switchBackToRater"/>
     <xs:enumeration value="unsupportedJavaFailure"/>
     <xs:enumeration value="auditFailure"/>
   </xs:restriction>
 </xs:simpleType>


Field Summary
static int ACCESS_COMPATIBILITY_FAILURE
          600: Reason code for old use of access (in subscription)
static int AUDIT_FAILURE
          900: Reason code when the operation cannot be audited
static int CACHE_INVALIDATION_FAILURE
          401: Reason code when the updater instance did not succeed to update in a synchronous way, the data caches belonging to the rater instances of the SAP CC system.
static int CANNOT_LOCK_RESOURCE
          101: Reason code when the SAP CC system cannot lock resources into the back-end database system after having tried several attempts.
static int CURRENCY_IS_NOT_DEFINED
          404: Reason code when a currency is unknown because the currency is not defined.
static int DATABASE_FAILOVER
          102: Reason code when the SAP CC system is failing over due to a database failure.
static int DATABASE_FAILURE
          100: Reason code when a failure occurred with the back-end database system.
static int HCI_CONCURRENCY_OPERATION
          302: Reason code relative to a service operation invocation on HCI APIs which is in concurrency with another operation
static int HCI_SERVICE_VIOLATION_PROTOCOL
          300: Reason code when the XML stream received by the HCI listeners (updater and admin) is not conformed to the HCI protocol specified in the XML APIs;
static int HCI_UNSUPPORTED_SERVICE
          301: Reason code relative to a service operation invocation on HCI APIs which is not supported
static int INCOMPATIBLE_CONFIGURATION
          2: Reason code when the server system cannot load its configuration due to out of rank parameter values or missing parameter values
static int INTER_INSTANCE_COMMUNICATION_FAILURE
          500: Reason code for networking/communication issues between rater, backups, and updater instances
static int IO_FAILURE
          501: Reason code when the server system encountered some I/O failure.
static int MESSAGE_QUEUE_FULL
          203: Reason code relative to fulfilling of queues implemented by the message protocol specified
static int MESSAGE_UNSUPPORTED_SERVICE
          204: Reason code relative to a service invocation on message APIs which is not supported
static int OFFER_CACHE_BUSY_WHILE_REFRESHING
          402: Reason code when the subscription cannot be charged because its related offer is temporary inaccessible due to cache refreshing process.
static int SERVER_SHUTTING_DOWN
          1: Reason code when the server system is shutting down
static int SERVER_TIMEOUT
          200: Reason code when the SAP CC system cannot execute the operation request (Java API) with the required timeout
static int SERVER_TO_CLIENT_COMMUNICATION_FAILURE
          502: Reason code when the SAP CC system encountered communication/network issues while trying to reply to your client application (or system).
static int SLEEPING_BULK_LOADER
          800: Reason code when the backup rejects a rating request due to the restarting of the original rater regarding to the partition ID
static int STATEFUL_SERVICE_VIOLATION_PROTOCOL
          201: Reason code when the message is sent to the stateful API is not conformed to the stateful protocol specified in the Java APIs
static int STATELESS_SERVICE_VIOLATION_PROTOCOL
          202: Reason code when the message is sent to the stateless API is not conformed to the stateless protocol specified in the Java APIs
static int SWITCH_BACK_TO_RATER
          700: Reason code when the backup rejects a rating request due to the restarting of the original rater regarding to the partition ID
static int TAX_CACHE_BUSY_WHILE_REFRESHING
          403: Reason code when the subscription cannot be charged because taxes are temporary inaccessible due to cache refreshing process.
static int UNSUPPORTED_FAILURE
          0: Contact your SAP Support Team - Reason code when the server system failure is unknown or not supported by the connected SAP CC system; There is a potential software anomaly.
static int UNSUPPORTED_JAVA_FAILURE
          -1: Contact your SAP Support Team - Reason code when the server system failure is a Java error and is not supported by the connected SAP CC system; All reasons relative to general server system failure get an ID of -1.
 
Constructor Summary
ServerFailureException()
          Reserved for HCI/XML protocol incarnation; DO NOT USE.
ServerFailureException(int reason, java.lang.String msg)
          Builds the reason/message exception.
ServerFailureException(int reason, java.lang.String msg, java.lang.Throwable t)
          Builds the exception.
 
Method Summary
 void addCharacterData(java.lang.String cData)
          Adds character data to the content element.
 void addChild(java.lang.String tagName, XMLMarshallable child)
          Adds a child to the object, the child representing the marshallable object which must be added to the element.
 void attach(java.lang.Object object)
          Attaches an object to this exception.
 java.lang.Object attachment()
          Returns the object attached to this exception.
 java.lang.String getMessage()
          Returns a readable exception description.
 java.lang.String getOperandReference()
          Gets the code or the reference (if no code exists) that identifies the operand of the operation request; If the operation is not auditable, the operand reference is null.
 int getReason()
          Returns the reason code of the exception.
 java.lang.Throwable getThrowable()
          Returns the original nested exception which is the cause of this generated ServerFailureException.
 void marshal(XMLOutputter output)
          Gives an XML representation of this object, including its children.
 int parseReason(java.lang.String str)
          Retrieves the numerical reason code from the reason string XML representation.
 java.lang.String reasonToString(int r)
          Returns the XML reason name from the reason code.
 void setAttributes(XMLAttributes atts)
          Sets the attributes of the XML representation of the element being processed.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

UNSUPPORTED_JAVA_FAILURE

public static final int UNSUPPORTED_JAVA_FAILURE
-1: Contact your SAP Support Team - Reason code when the server system failure is a Java error and is not supported by the connected SAP CC system; All reasons relative to general server system failure get an ID of -1.
Next Steps

Caution

Contact a support specialist from your SAP Support Team.

See Also:
Constant Field Values

UNSUPPORTED_FAILURE

public static final int UNSUPPORTED_FAILURE
0: Contact your SAP Support Team - Reason code when the server system failure is unknown or not supported by the connected SAP CC system; There is a potential software anomaly.
Next Steps

Caution

Contact a support specialist from your SAP Support Team.

See Also:
Constant Field Values

SERVER_SHUTTING_DOWN

public static final int SERVER_SHUTTING_DOWN
1: Reason code when the server system is shutting down

See Also:
Constant Field Values

INCOMPATIBLE_CONFIGURATION

public static final int INCOMPATIBLE_CONFIGURATION
2: Reason code when the server system cannot load its configuration due to out of rank parameter values or missing parameter values

See Also:
Constant Field Values

DATABASE_FAILURE

public static final int DATABASE_FAILURE
100: Reason code when a failure occurred with the back-end database system.
Next Steps

Verify the logs (and traces) of the SAP CC Core Server system to get the related database error information. Contact the database administrator (dba).

See Also:
Constant Field Values

CANNOT_LOCK_RESOURCE

public static final int CANNOT_LOCK_RESOURCE
101: Reason code when the SAP CC system cannot lock resources into the back-end database system after having tried several attempts.

This error occurs:

Next Steps

Check the value of the SQLHELPER_MAX_REDO system parameter.

See Also:
Constant Field Values

DATABASE_FAILOVER

public static final int DATABASE_FAILOVER
102: Reason code when the SAP CC system is failing over due to a database failure. This error occurs when a transaction cannot be completed on the same database node because the database node failed over.

The charging operation request can be re-attempted.

Next Steps

Design and develop the implementation of the automated processing of this particulare case to request the charging operation again to the SAP CC system.

See Also:
Constant Field Values

SERVER_TIMEOUT

public static final int SERVER_TIMEOUT
200: Reason code when the SAP CC system cannot execute the operation request (Java API) with the required timeout

See Also:
Constant Field Values

STATEFUL_SERVICE_VIOLATION_PROTOCOL

public static final int STATEFUL_SERVICE_VIOLATION_PROTOCOL
201: Reason code when the message is sent to the stateful API is not conformed to the stateful protocol specified in the Java APIs

See Also:
Constant Field Values

STATELESS_SERVICE_VIOLATION_PROTOCOL

public static final int STATELESS_SERVICE_VIOLATION_PROTOCOL
202: Reason code when the message is sent to the stateless API is not conformed to the stateless protocol specified in the Java APIs

See Also:
Constant Field Values

MESSAGE_QUEUE_FULL

public static final int MESSAGE_QUEUE_FULL
203: Reason code relative to fulfilling of queues implemented by the message protocol specified

See Also:
Constant Field Values

MESSAGE_UNSUPPORTED_SERVICE

public static final int MESSAGE_UNSUPPORTED_SERVICE
204: Reason code relative to a service invocation on message APIs which is not supported

See Also:
Constant Field Values

HCI_SERVICE_VIOLATION_PROTOCOL

public static final int HCI_SERVICE_VIOLATION_PROTOCOL
300: Reason code when the XML stream received by the HCI listeners (updater and admin) is not conformed to the HCI protocol specified in the XML APIs;

See Also:
Constant Field Values

HCI_UNSUPPORTED_SERVICE

public static final int HCI_UNSUPPORTED_SERVICE
301: Reason code relative to a service operation invocation on HCI APIs which is not supported

See Also:
Constant Field Values

HCI_CONCURRENCY_OPERATION

public static final int HCI_CONCURRENCY_OPERATION
302: Reason code relative to a service operation invocation on HCI APIs which is in concurrency with another operation

See Also:
Constant Field Values

CACHE_INVALIDATION_FAILURE

public static final int CACHE_INVALIDATION_FAILURE
401: Reason code when the updater instance did not succeed to update in a synchronous way, the data caches belonging to the rater instances of the SAP CC system.

See Also:
Constant Field Values

OFFER_CACHE_BUSY_WHILE_REFRESHING

public static final int OFFER_CACHE_BUSY_WHILE_REFRESHING
402: Reason code when the subscription cannot be charged because its related offer is temporary inaccessible due to cache refreshing process.

See Also:
Constant Field Values

TAX_CACHE_BUSY_WHILE_REFRESHING

public static final int TAX_CACHE_BUSY_WHILE_REFRESHING
403: Reason code when the subscription cannot be charged because taxes are temporary inaccessible due to cache refreshing process.

See Also:
Constant Field Values

CURRENCY_IS_NOT_DEFINED

public static final int CURRENCY_IS_NOT_DEFINED
404: Reason code when a currency is unknown because the currency is not defined.

See Also:
Constant Field Values

INTER_INSTANCE_COMMUNICATION_FAILURE

public static final int INTER_INSTANCE_COMMUNICATION_FAILURE
500: Reason code for networking/communication issues between rater, backups, and updater instances

See Also:
Constant Field Values

IO_FAILURE

public static final int IO_FAILURE
501: Reason code when the server system encountered some I/O failure.

See Also:
Constant Field Values

SERVER_TO_CLIENT_COMMUNICATION_FAILURE

public static final int SERVER_TO_CLIENT_COMMUNICATION_FAILURE
502: Reason code when the SAP CC system encountered communication/network issues while trying to reply to your client application (or system).

See Also:
Constant Field Values

ACCESS_COMPATIBILITY_FAILURE

public static final int ACCESS_COMPATIBILITY_FAILURE
600: Reason code for old use of access (in subscription)

See Also:
Constant Field Values

SWITCH_BACK_TO_RATER

public static final int SWITCH_BACK_TO_RATER
700: Reason code when the backup rejects a rating request due to the restarting of the original rater regarding to the partition ID

See Also:
Constant Field Values

SLEEPING_BULK_LOADER

public static final int SLEEPING_BULK_LOADER
800: Reason code when the backup rejects a rating request due to the restarting of the original rater regarding to the partition ID

See Also:
Constant Field Values

AUDIT_FAILURE

public static final int AUDIT_FAILURE
900: Reason code when the operation cannot be audited

See Also:
Constant Field Values
Constructor Detail

ServerFailureException

public ServerFailureException()
Reserved for HCI/XML protocol incarnation; DO NOT USE.


ServerFailureException

public ServerFailureException(int reason,
                              java.lang.String msg,
                              java.lang.Throwable t)
Builds the exception.

Parameters:
reason - The exception reason
msg - The exception message
t - The nested (throwable) exception

ServerFailureException

public ServerFailureException(int reason,
                              java.lang.String msg)
Builds the reason/message exception.

Parameters:
reason - The exception reason
msg - The exception message
Method Detail

attach

public void attach(java.lang.Object object)
Attaches an object to this exception.

Parameters:
object - The object to be attached (can be null); Is retrieved thanks to the method attachment().

attachment

public java.lang.Object attachment()
Returns the object attached to this exception.

Returns:
The object set thanks to the method attach(Object)

getMessage

public java.lang.String getMessage()
Returns a readable exception description.

Overrides:
getMessage in class java.lang.Throwable
Returns:
A readable description of the exception

getThrowable

public java.lang.Throwable getThrowable()
Returns the original nested exception which is the cause of this generated ServerFailureException.

Note

This method returns always null in your client application (client side).

Returns:
The nested exception (server side only) or null (client side)

setAttributes

public void setAttributes(XMLAttributes atts)
Description copied from interface: XMLMarshallable
Sets the attributes of the XML representation of the element being processed.

Parameters:
atts - The XML attributes of the current element

addCharacterData

public void addCharacterData(java.lang.String cData)
Description copied from interface: XMLMarshallable
Adds character data to the content element.

Parameters:
cData - The character data to be added

addChild

public void addChild(java.lang.String tagName,
                     XMLMarshallable child)
Description copied from interface: XMLMarshallable
Adds a child to the object, the child representing the marshallable object which must be added to the element.

Parameters:
tagName - The name of tag for the child
child - The child to be added

marshal

public void marshal(XMLOutputter output)
Description copied from interface: XMLMarshallable
Gives an XML representation of this object, including its children.

Parameters:
output - The XML output to marshal the object into

getOperandReference

public java.lang.String getOperandReference()
Description copied from interface: OperationResult
Gets the code or the reference (if no code exists) that identifies the operand of the operation request; If the operation is not auditable, the operand reference is null.

Specified by:
getOperandReference in interface OperationResult
Overrides:
getOperandReference in class OperationFailureException
Returns:
The operand reference of the operation result

getReason

public int getReason()
Returns the reason code of the exception.

The available reasons are:

Check the Field Summary of the XSD Fragment section to have a complete list.

Returns:
The reason code of the exception

parseReason

public int parseReason(java.lang.String str)
Retrieves the numerical reason code from the reason string XML representation.

Parameters:
str - The reason XML representation
Returns:
The numeric code of the reason

reasonToString

public java.lang.String reasonToString(int r)
Returns the XML reason name from the reason code.

Parameters:
r - The reason code
Returns:
The XML name of the reason

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Throwable

Document Published: October 2015 (SAP CC 4.0 SP10 and Later)